﻿ 
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Demo.Models
{
    /// <summary>
    /// Class BaseEntity.
    /// </summary>
    public abstract class BaseEntity<TKey>
    {


        public BaseEntity()
        {
            CreatedBy = "System";
            CreatedTime = DateTime.Now;
        }

        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>The identifier.</value>
   
  
        public TKey Id { get; set; }

        /// <summary>
        /// Gets or sets the created by.
        /// </summary>
        /// <value>The created by.</value>
 
        public string CreatedBy { get; set; }

        /// <summary>
        /// Gets or sets the update by.
        /// </summary>
        /// <value>The update by.</value>
    
        public string UpdateBy { get; set; }

        /// <summary>
        /// Gets or sets the updated time.
        /// </summary>
        /// <value>The updated time.</value>
    
        public DateTime? UpdatedTime { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is deleted.
        /// </summary>
        /// <value><c>true</c> if this instance is deleted; otherwise, <c>false</c>.</value>
   
        public bool IsDeleted { get; set; }

        /// <summary>
        /// Gets or sets the created time.
        /// </summary>
        /// <value>The created time.</value>
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 排序Id
        /// </summary>
        public int SortId { get; set; }
        /// <summary>
        /// Gets or sets the timestamp.
        /// </summary>
        /// <value>The timestamp.</value>
 
        public byte[] Timestamp { get; set; }
    }
}
